﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Categories.ascx.cs"
    Inherits="Doctors_WebForum.Admin.UIControls.Categories" %>

<script src="Js/Categories.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript" src="Js/JScript.js"></script>

<script type="text/javascript" language="javascript" src="Js/jquery-1.4.4.min.js"></script>

<script type="text/javascript" language="javascript" src="Js/Util.js"></script>

<script src="Js/SMCommon.js" type="text/javascript"></script>

<script src="Js/Util.js" type="text/javascript"></script>

<script src="Js/Paging.js" type="text/javascript"></script>

<div>
    <div class="pageIntro">
        <h2>
            Managerment Categories</h2>
        <p>
            Here's administrator can update/view/delete information about categories</p>
    </div>
    <div class="contentBox">
        <div class="contentBoxTop">
            <h3>
                List information about categories is exits in forum
            </h3>
            <label id="search" class="smallInput">
                Quick Find :
                <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
            </label>
        </div>
        <div id="divFuncAction" class="panelHidden">
            <table cellpadding="0" width="100%" style="border-collapse: collapse; text-align: center;"
                cellspacing="0" class="Table_Border">
                <tr>
                    <td>
                        <a href="#idFocus" id="idFocus" name="idFocus"></a>
                    </td>
                </tr>
                <tr class="Row_Header">
                    <td colspan="2" style="height: 25px;">
                        &nbsp;Add New\Update a Category
                    </td>
                </tr>
                <tr>
                    <td class="Col_Left">
                        <font color="#ff0000">* </font>Title:&nbsp;
                    </td>
                    <td class="Col_Right">
                        <input class="TextBox" type="text" id="txtTitle" maxlength="200" style="width: 320px;"
                            value="" />
                        <input type="hidden" id="hidCateID" value="" />
                    </td>
                </tr>
                <tr>
                    <td class="Col_Left" style="height: 25px">
                        <font color="#ff0000">* </font>Sub:&nbsp;
                    </td>
                    <td class="Col_Right" style="height: 25px">
                        <select id="drpSub" class="ListBox" style="width: 323px;">
                            <option value="-1">--Select Parent--</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="Col_Left" style="height: 25px">
                        <font color="#ff0000">* </font>Order:&nbsp;
                    </td>
                    <td class="Col_Right" style="height: 25px">
                        <input class="TextBox" type="text" id="txtOrder" maxlength="3" style="width: 320px;"
                            value="" />
                    </td>
                </tr>
                <tr>
                    <td class="Col_Left">
                        <font color="#ff0000">* </font>Status:&nbsp;
                    </td>
                    <td class="Col_Right">
                        <select id="drpStatus" class="ListBox" style="width: 323px;">
                            <option value="-1">--Select Status--</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="Col_Left">
                        Description:&nbsp;
                    </td>
                    <td class="Col_Right">
                        <textarea id="txtDescription" cols="29" rows="5" class="TextBox" style="width: 320px;"></textarea>
                    </td>
                </tr>
                <tr class="Row_Button">
                    <td>
                    </td>
                    <td align="left">
                        &nbsp;<input type="button" value="Update" class="ButtonAction" onclick="Function_SaveOrUpdate(0);"
                            id="Button1" />
                        <input type="button" onclick="Function_SaveOrUpdate();" class="ButtonAction" value="Update And Continue"
                            id="btnAddNewAndContinue" style="width: auto;"/>
                        <input type="button" value="ReEnter" class="ButtonAction" onclick="Function_Reset();" />
                        <input type="button" value="Skip" class="ButtonAction" onclick="Function_Cancel();"
                            id="Button2" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="innerContent">
            <!--Message will active if cann not load data-->
            <asp:Label ID="lblMessage" runat="server"></asp:Label>
            <!--Load list users with paging using datalist controls-->
            <table width="100%" class="sTable">
                <thead>
                    <tr>
                        <td align="center" style="height: 27px; width: 3%;">
                            <input type="checkbox" id="chkAll" onclick="checkAll(this.id,'chkFunction');" />
                        </td>
                        <th>
                            <strong>Title</strong>
                        </th>
                        <th>
                            <strong>Description</strong>
                        </th>
                        <th>
                            <strong>Order</strong>
                        </th>
                        <th>
                            <strong>Status</strong>
                        </th>
                        <th style="width: 7%;">
                            <strong>Edit</strong>
                        </th>
                    </tr>
                </thead>
                <tr id="trNoReSult" style="display: none;">
                    <td colspan="9" class="Row_Message">
                        Not found data.
                    </td>
                </tr>
                <tbody id="functionGird">
                    <tr id="funcTemp" class="oddRow">
                        <td align="center" id="tdCheckbox" valign="middle">
                            <input type="checkbox" id="chk" name='chkFunction' />
                        </td>
                        <td id="tdTitle">
                        </td>
                        <td id="tdDescription">
                        </td>
                        <td id="tdOrder">
                        </td>
                        <td id="tdStatus">
                        </td>
                        <td class="editItem" align="center">
                            <img alt="" onclick="Function_Edit(this.id.substring(5))" src="images/icon_edit.gif"
                                id="edit_" style="cursor: pointer;" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="panelShow" id="divPag">
            <table cellspacing="0" cellpadding="0" border="1" style="border-collapse: collapse;
                width: 100%;" class="Table_Border">
                <tbody>
                    <tr class="Row_Page">
                        <td align="left" style="width: 54%; height: 25px;">
                            <input type="button" onclick="Function_AddNew();" class="Button" value="Add New" id="btnAddNew" />
                            <input type="button" onclick="Function_Del();" class="Button" value="Delete" id="btnFunctionDel" />
                        </td>
                        <td style="width: 22%;">
                            <div id="numPage">
                                View:
                                <select onchange="DrpChange()" style="height: 20px;" id="drpNumPage">
                                    <option value="5" selected="selected">5</option>
                                    <option value="10">10</option>
                                    <option value="30">30</option>
                                    <option value="50">50</option>
                                    <option value="70">70</option>
                                    <option value="100">100</option>
                                </select>
                                users/page</div>
                        </td>
                        <td style="width: 60%;">
                            <div style="float: right;">
                                <div style="" id="divPaging">
                                </div>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!--end of #box-3-->
    </div>
    <div class="contentBox" id="pages">
        <div class="contentBoxTop">
            <h3>
                Managerment information of categories</h3>
            <ul class="switcherTabs">
                <li class="selected"><a href="#box-1">Add New</a></li>
                <!-- the link location of this tab refers to the id of the related div -->
                <li><a href="#box-2">Edit</a></li>
            </ul>
        </div>
        <div class="innerContent" id="box-1">
            Parent ID
            <br />
            <label class="smallInput">
                <asp:TextBox ID="txtParentID" runat="server"></asp:TextBox>
            </label>
            <p>
                Title
                <br />
                <label class="mediumInput">
                    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                </label>
            </p>
            <p>
                Description
                <br />
                <label class="textarea">
                    <asp:TextBox TextMode="MultiLine" ID="txtDescription" runat="server"></asp:TextBox>
                </label>
            </p>
            <p>
                Order<br />
                <label>
                    <asp:TextBox ID="txtOrder" runat="server"></asp:TextBox>
                </label>
            </p>
            <p>
                <input name="" type="image" src="images/bt_submit.gif" />
            </p>
        </div>
        <!--end of #box-1-->
        <div class="innerContent" id="box-2" style="display: none">
            implement edit for Categories
        </div>
    </div>
</div>

<script type="text/javascript" language="javascript">
    // load data
    if (window.addEventListener) {
        window.addEventListener("load", initListCategory, false);
    } else if (window.attachEvent) {
        window.attachEvent("onload", initListCategory);
    } else {
        window.onload = initListCategory;
    }
</script>

